home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 50
/
Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso
/
STFax
/
Install
next >
Wrap
Text File
|
2002-07-31
|
9KB
|
323 lines
; $VER: STFax-Install 2.0 (17.12.97)
;
; Installer script by Simone Tellini <wiz@pragmanet.it>
; with the help of Ben Preece <beej@bigfoot.com>
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; set initial variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(set @app-name "STFax Professional")
(set AppDir "STFax")
(set @error-msg "An unexpected error has occured. Installation aborted.")
(if (<= (/ (getversion) 65536) 38)
(set Kick2 1)
(set Kick2 0)
)
(if (exists "STFax:" (noreq))
(set @default-dest (pathonly (expandpath "STFax:")))
)
(complete 0)
(welcome)
(set InstallDir
(askdir
(prompt "Please select where you would like " @app-name " installed.\n"
"A drawer called '" AppDir "' will be created there.")
(help "Select where you would like " @app-name " installed. "
"The installer will then create a drawer called '" AppDir "', "
"and copy the program and necessary files into it.\n")
(default @default-dest)
)
)
(Set DestDir (tackon InstallDir AppDir))
(Set FaxInDir (tackon DestDir "Fax_In"))
(Set FaxOutDir (tackon DestDir "Fax_Out"))
(Set ConfigDir (tackon DestDir "Config"))
(Set LocaleDir (tackon DestDir "Catalogs"))
(Set ContribDir (tackon DestDir "Contributions"))
(Set DataDir (tackon DestDir "Data"))
(Set PicsDir (tackon DestDir "Pics"))
(Set RexxDir (tackon DestDir "Rexx"))
(Set ScriptDir (tackon DestDir "Scripts"))
(Set DocsDir (tackon DestDir "Docs"))
(Set MessagesDir (tackon DestDir "Messages"))
(set @default-dest DestDir)
(set MainExe "STFax")
(makeassign "STFaxInstall" "AMINET50:STFax/STFax")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ask registration parameters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(set UserName
(askstring
(prompt "Please enter your full name:")
(help "Enter your full name. This is needed to register your"
"copy of " @app-name)
)
)
(set UserCompany
(askstring
(prompt "Please enter your company name:")
(help "Enter your company name. This is needed to register your"
"copy of " @app-name)
)
)
(set UserCode
(askstring
(prompt "Please enter your registration code:")
(help "Enter your registration code. You can find it on your"
"registration card. Make sure to enter it correctly!")
)
)
(set KeyFile (cat UserName "\n" UserCompany "\n" UserCode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Create directories
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(makedir DestDir)
(makedir LocaleDir (infos))
(makedir FaxInDir (infos))
(makedir FaxOutDir (infos))
(makedir DataDir)
(makedir ConfigDir)
(makedir MessagesDir)
(makedir (tackon MessagesDir "0000"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copy files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (exists ("STFaxInstall:/STFax.info"))
(copyfiles
(source "STFaxInstall:/STFax.info")
(dest InstallDir)
(infos)
(noposition)
)
)
(complete 10)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copy main file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(copyfiles
(source (tackon "STFaxInstall:" MainExe))
(dest DestDir)
(newname "STFax")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; copy icons files, if needed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (= (exists (tackon DestDir "STFax.info")) 0)
(copyfiles (source "STFaxInstall:STFax.info") (dest DestDir) (noposition))
)
(if (= (exists (tackon DestDir "STFax.guide.info")) 0)
(copyfiles (source "STFaxInstall:STFax.guide.info") (dest DestDir) (noposition))
)
(copyfiles (source "STFaxInstall:Catalogs.info") (dest DestDir) (noposition))
(copyfiles (source "STFaxInstall:Rexx.info") (dest DestDir) (noposition))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; copy sub directories
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(copyfiles (source "STFaxInstall:Rexx") (dest RexxDir) (noposition) (infos) (all))
(copyfiles (source "STFaxInstall:Scripts") (dest ScriptDir) (noposition) (infos) (all))
(copyfiles (source "STFaxInstall:Pics") (dest PicsDir) (all))
(complete 20)
(copyfiles (source "STFaxInstall:Data") (dest DataDir) (all))
(copyfiles (source "STFaxInstall:Docs") (dest DocsDir) (noposition) (infos) (all))
(complete 40)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; move old files in the right position
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (= (exists (tackon DestDir "NoData.txt")) 1)
(
(copyfiles (source (tackon DestDir "NoData.txt")) (dest DataDir))
(delete (tackon DestDir "NoData.txt"))
)
)
(copyfiles (source "STFaxInstall:STFax.guide") (dest DestDir))
(if Kick2
(tooltype
(dest (tackon DestDir "STFax.guide"))
(setdefaulttool "AmigaGuide")
)
)
(complete 50)
(copyfiles
(source "STFaxInstall:Catalogs")
(dest LocaleDir)
(pattern "#?.c?")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Install MUI classes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/NFloattext.mcc")
(dest "MUI:Libs/MUI")
(confirm)
)
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/NList.mcc")
(dest "MUI:Libs/MUI")
(confirm)
)
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/NListview.mcc")
(dest "MUI:Libs/MUI")
(confirm)
)
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/NListviews.mcp")
(dest "MUI:Libs/MUI")
(confirm)
)
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/Textinput.mcc")
(dest "MUI:Libs/MUI")
(confirm)
)
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/Textinput.mcp")
(dest "MUI:Libs/MUI")
(confirm)
)
(copylib
(prompt "Installing some MUI classes...")
(help "This will install some MUI classes needed by STFax")
(source "STFaxInstall:MUI/Textinputscroll.mcc")
(dest "MUI:Libs/MUI")
(confirm)
)
(complete 60)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Install stuff on SYS:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(copyfiles
(source "STFaxInstall:Devs/Printers/STFaxPrt")
(dest "DEVS:Printers")
)
(copyfiles
(source "STFaxInstall:Devs/Datatypes")
(dest "DEVS:Datatypes")
(pattern "#?")
(infos)
(noposition)
)
(copylib
(prompt "Installing STFax.datatype...")
(help "This will install the STFax.datatype: it will let "
"you import STFax faxes into any program that supports "
"datatypes.")
(source "STFaxInstall:Classes/Datatypes/STFax.datatype")
(dest "SYS:Classes/Datatypes")
(confirm)
)
(complete 70)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Update the user-startup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(startup "STFax"
(prompt "Editing your S:User-Startup")
(help "The Installer will add one assign needed by STFax")
(command (cat "Assign STFax: \"" DestDir "\" >NIL:"))
)
(makeassign "STFax" DestDir)
(textfile
(prompt "Creating your key file")
(dest "STFax:STFax.key")
(append KeyFile)
)
(complete 80)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; install catalogs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(copyfiles
(prompt "Copying catalog files")
(help @copyfiles-help)
(source "STFaxInstall:Catalogs")
(dest LocaleDir)
(choices "italiano")
(confirm)
)
(complete 90)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete temp files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(working "Removing temporary files...")
(run "Assign STFaxInstall: REMOVE")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; All done.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(complete 100)